import os
from importlib import import_module
import inspect

# Get path to the current directory
current_directory = os.path.dirname(os.path.abspath(__file__))

for module in os.listdir(current_directory):
    # Check if the file is a Python file
    if module.endswith('.py') and module != '__init__.py':
        module_name = module.split('.')[0]

        # Import the module
        module_obj = import_module(f"modules.{module_name}")
        
        for name, obj in inspect.getmembers(module_obj):
            if inspect.isclass(obj) or inspect.isfunction(obj):
                globals()[name] = obj